#include <iostream>
#include <ctype.h>
using namespace std;
void move(int num, int x, int y, int z);
void main() {
	int h;
	char flag = 'y';
	while (tolower(flag) != 'n') {
		cout << "ººÅµËþÎÊÌâ" << endl << "Please input the number of the diskes: ";
		cin >> h;
		cout << "The steps to moving " << h << " diskes are as follows:" << endl;
		move(h, 1, 2, 3);
		cout << endl << "Do you want to go on?(y for yes, n for no) ";
		cin >> flag;
	}
}
void move(int num, int x, int y, int z)
{
	if (num == 1)
	{
		cout << x << "-->" << z << "   ";
	}
	else
	{
		move(num - 1, x, z, y);
		cout << x << "-->" << z << "   ";
		move(num - 1, y, x, z);
	}
}
